import axios from "axios";
import {requestInterceptor,responseInterceptor} from "@/utils/interceptors/interceptors";

const instance = axios.create({
  baseURL: "https://qqqq—backend/api/",
  timeout: 1000,
});

// 配置请求拦截器
instance.interceptors.request.use(requestInterceptor(config)
);
// 配置响应拦截器
instance.interceptors.response.use(responseInterceptor);


function Request(url,data={},config={}) {
  return instance.post(url,data,config);
}

export default Request;